package com.ljw.spring.annotation.tx;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @FileName UserService
 * @Description TODO
 * @Author ljw
 * @Date 2021/2/4 0:38
 * @Version 1.0
 */
@Service
public class UserService {

    @Autowired
    UserDao userDao;

    @Transactional
    public void insertUser(){
        userDao.insert();
        int i=10/0;
    }
}
